-- MUX_4 Architecture
-- Chang Lan, <changlan9@gmail.com>
-- 11/10/2011

library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
-- load def
use work.global_definition.all;

architecture behave of mux4 is
begin
    process(a, b, c, d, op)
    begin
        case op is
            when "00" =>
                output <= a;
            when "01" =>
                output <= b;
            when "10" =>
                output <= c;
            when "11" =>
                output <= d;
            when others =>
                output <= (others => 'X');
        end case;
    end process;
end behave;
